<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <title>基本测试页面</title>
    <meta charset="UTF-8">
</head>
<body>
    <h1>基本测试页面</h1>
    
    <h2>当前用户信息:</h2>
    <p>用户名: ${sessionScope.currentUser.username}</p>
    <p>用户ID: ${sessionScope.currentUser.userId}</p>
    
    <h2>宠物列表测试:</h2>
    <c:if test="${empty myPets}">
        <p>宠物列表为空</p>
    </c:if>
    
    <c:if test="${not empty myPets}">
        <p>找到宠物数据:</p>
        <ul>
            <c:forEach var="pet" items="${myPets}">
                <li>ID: ${pet.petId}, 名称: ${pet.petName}, 类型: ${pet.petType}</li>
            </c:forEach>
        </ul>
        
        <h3>选择框测试:</h3>
        <select>
            <option value="">请选择宠物</option>
            <c:forEach var="pet" items="${myPets}">
                <option value="${pet.petId}">${pet.petName} (${pet.petType})</option>
            </c:forEach>
        </select>
    </c:if>
    
    <hr>
    <p><a href="${pageContext.request.contextPath}/appointment/add">访问预约页面</a></p>
    <p><a href="${pageContext.request.contextPath}/pages/user/appointment-add-simple.jsp">访问简化预约页面</a></p>
</body>
</html>
